<template>
  <div style="height:100%;width:100%;position:relative;">
      <div class="page-container">

          <div class="page-bottom">
              <rm-layout-right splitcolor="#FFFFFF" movingcolor="#CCFFFF" :splitwidth=5 :fixsize=560>
                  <div class="middle-left" style="height:100%">
                          <table style="width:100%;font-size:12px">
                              <tr>
                                  <td align="right" style="color:#F56C6C;width:100px">登录代码</td>
                                  <td width="200px">
                                      <el-input v-model="addParam.userno" :disabled = "true"></el-input>
                                  </td>
                                  <!-- <td align="right" width="120px">序号</td>
                                  <td width="200px" >
                                      <el-input v-model="addParam.seqno" style="width:100%" ref="input2" :disabled = "true"></el-input>
                                  </td> -->
                                  <td align="right" style="color:#F56C6C;width:90px">员工代码</td>
                                  <td width="200px">
                                      <el-input v-model="addParam.employeeno" style="width:200px"  :disabled = "true"></el-input>
                                  </td>
                                      <td colspan="2" rowspan="6">
                                      <el-upload class="avatar-uploader" action="" :show-file-list="false" :auto-upload="false" :before-upload="imagebefore"   accept="image/jpeg,image/png">
                                          <img v-if="personImageUrl" :src="personImageUrl" class="avatar"  style="width: 150px;height:170px; margin-left: 100px;"/>
                                          <i v-else class="el-icon-plus avatar-uploader-icon" style="margin-left: 100px"></i>
                                      </el-upload>
                                  </td>
                              </tr>
                              <tr>
                                  <td align="right" style="color:#F56C6C">员工姓名</td>
                                  <td>
                                      <el-input v-model="addParam.employeename" style="width:100%" ref="input1" @keyup.enter.native="nextFocus(1)" @input="hasChange(1)" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">生日</td>
                                  <td>
                                      <el-date-picker v-model="addParam.birth" type="date" format="yyyy 年 MM 月 dd 日" style="width:100%" value-format="yyyy-MM-dd" ref="input2" @keyup.enter.native="nextFocus(2)" @input="hasChange"></el-date-picker>
                                  </td>
                              </tr>
                              <tr>
                                  <td align="right">年龄</td>
                                      <td>
                                      <el-input v-model="agestr" style="width:100%"  :disabled="true"></el-input>
                                  </td>
                                  <td align="right">性别</td>
                                  <td>
                                      <el-radio-group v-model="addParam.sex" size="mini" width="100%" @input="hasChange">
                                          <el-radio :label='"1"'   @keyup.enter.native="nextFocus(8)">男</el-radio>
                                          <el-radio :label='"2"'>女</el-radio>
                                      </el-radio-group>
                                  </td>
                              </tr>
                              <tr>
                                  <td align="right">所属工作组</td>
                                  <td>
                                      <rm-ddl-common v-model="addParam.labgroupid"  datatype="labgroup" dataname="工作组" :appendtobody="true" width="100%"  :disabled="true"></rm-ddl-common>
                                  </td>
                                  <td align="right">所属血库组</td>
                                  <td>
                                      <rm-ddl-common datatype="bldlabgroup" dataname="血库组" v-model="addParam.bldlabgroupid" width="100%" ref="input6"  :disabled="true"></rm-ddl-common>
                                  </td>
                              </tr>
                              <tr>
                                  <td align="right">所属检验科室</td>
                                  <td>
                                      <rm-ddl-common v-model="addParam.labdeptcode" datatype="labdept" dataname="工作组" :appendtobody="true" width="100%" :disabled="true"></rm-ddl-common>
                                  </td>
                                  <td align="right">所属医院</td>
                                  <td>
                                      <rm-ddl-common v-model="addParam.hospcode" datatype="hospital" dataname="工作组" :appendtobody="true" width="100%" :disabled="true"></rm-ddl-common>
                                  </td>
                              </tr>
                              <tr>
                                  <td align="right">职务</td>
                                  <td>
                                      <rm-ddl-common v-model="addParam.jobtitle" datatype="seccode" kindno="jobtitle" kindname="职务" dataname="职务" width="100%"     :disabled="true" @change="hasChange"></rm-ddl-common>
                                  </td>
                                  <td align="right">政治面貌</td>
                                  <td>
                                      <rm-ddl-common v-model="addParam.politicalstatus" datatype="seccode" kindno="ps" kindname="政治面貌" dataname="政治面貌" width="200px" ref="input3" @keyup.enter.native="nextFocus(3)" @change="hasChange"></rm-ddl-common>
                                  </td>
                              </tr>
                              <tr>
                                  <td align="right">最高职称</td>
                                  <td>
                                      <rm-ddl-common v-model="addParam.title" datatype="seccode" kindno="acatitle" kindname="职称" dataname="职称" width="100%"  :disabled="true" @change="hasChange"></rm-ddl-common>
                                  </td>
                                  <td align="right">附件数</td>
                                  <td>
                                      <table style="border-spacing:0px">
                                          <tr>
                                              <td>
                                                  <el-input v-model="addParam.title_cnt" disabled style="width:60px" @dblclick.native="OpenFileList('off_title')"></el-input>
                                              </td>
                                              <td>(双击开窗选择)</td>
                                          </tr>
                                      </table>
                                  </td>
                              </tr>
                                  <tr>
                                  <td align="right">职称获取日期</td>
                                  <td>
                                  <el-date-picker v-model="addParam.titledate" type="date" format="yyyy 年 MM 月 dd 日" style="width:100%" value-format="yyyy-MM-dd" :disabled="true" ></el-date-picker>
                                  </td>
                                      <td align="right">医院聘任日期</td>
                                  <td>
                                          <el-date-picker v-model="addParam.titlehospdate" type="date" format="yyyy 年 MM 月 dd 日" style="width:100%" value-format="yyyy-MM-dd" :disabled="true" ></el-date-picker>
                                  </td>
                                  <td align="right" width="90px">科室工作日期</td>
                                  <td>
                                      <el-date-picker v-model="addParam.indeptdate" type="date" format="yyyy 年 MM 月 dd 日" style="width:200px" value-format="yyyy-MM-dd"   :disabled="true" ></el-date-picker>
                                  </td>
                              </tr>
                              <tr>
                                  <td align="right">微信号</td>
                                  <td>
                                      <el-input v-model="addParam.wechatno" style="width:100%" ref="input4" @keyup.enter.native="nextFocus(4)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">移动电话</td>
                                  <td>
                                      <el-input v-model="addParam.mobilephonenum" style="width:100%" ref="input5" @keyup.enter.native="nextFocus(5)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">固定电话</td>
                                  <td>
                                      <el-input v-model="addParam.phonenum" style="width:200px" ref="input6" @keyup.enter.native="nextFocus(6)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                              </tr>
                              <!-- <tr>

                                  <td align="right">离职日期</td>
                                  <td>
                                      <el-date-picker v-model="addParam.outdeptdate" type="date" format="yyyy 年 MM 月 dd 日" style="width:100%" :disabled="true" ></el-date-picker>
                                  </td>
                              </tr>  -->
                              <tr>
                                  <td align="right">ABO血型</td>
                                  <td>
                                      <el-select v-model="addParam.abo_bldtype" clearable style="width:100%" ref="input7" @keyup.enter.native="nextFocus(7)" @input="hasChange">
                                          <el-option v-for="item in aboOption" :key="item.value" :value="item.value" :label="item.label"></el-option>
                                      </el-select>
                                  </td>
                                  <td align="right">RH</td>
                                  <td>
                                      <el-select v-model="addParam.rh_bldtype" clearable style="width:100%" ref="input8" @keyup.enter.native="nextFocus(8)" @input="hasChange">
                                          <el-option v-for="item in rhOption" :key="item.value" :value="item.value" :label="item.label"></el-option>
                                      </el-select>
                                  </td>
                                  <td align="right" style="width:120px" >色觉</td>
                                  <td>
                                      <rm-ddl-common v-model="addParam.coloursense" datatype="seccode" kindno="coloursense" kindname="政治面貌" dataname="色觉" width="200px" ref="input9" @keyup.enter.native="nextFocus(9)" @change="hasChange"></rm-ddl-common>
                                  </td>
                              </tr>
                              <tr>
                                  <td align="right">民族</td>
                                  <td>
                                      <el-input v-model="addParam.nation" style="width:100%" ref="input10" @keyup.enter.native="nextFocus(10)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">身高CM</td>
                                  <td>
                                      <el-input v-model="addParam.height" style="width:100%" ref="input11" @keyup.enter.native="nextFocus(11)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">体重KG</td>
                                  <td>
                                      <el-input v-model="addParam.weight" style="width:200px" ref="input12" @keyup.enter.native="nextFocus(12)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                              </tr>
                              <tr>
                                  <td align="right">婚否</td>
                                  <td>
                                      <el-select v-model="addParam.marriage" clearable style="width:100%" ref="input13" @keyup.enter.native="nextFocus(13)" @input="hasChange">
                                          <el-option v-for="item in marriageOption" :key="item.value" :value="item.value" :label="item.label"></el-option>
                                      </el-select>
                                  </td>
                                  <td align="right">宗教信仰</td>
                                  <td>
                                      <el-input v-model="addParam.faith" style="width:100%" ref="input14" @keyup.enter.native="nextFocus(14)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">籍贯</td>
                                  <td>
                                      <el-input v-model="addParam.birthplace" style="width:200px" ref="input15" @keyup.enter.native="nextFocus(15)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>

                              </tr>
                              <tr>
                                  <td align="right">身份证号</td>
                                  <td>
                                      <el-input v-model="addParam.idcardno" style="width:100%" ref="input16" @keyup.enter.native="nextFocus(16)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">外语水平</td>
                                  <td>
                                      <el-input v-model="addParam.forgnlang_level" style="width:100%" ref="input17" @keyup.enter.native="nextFocus(17)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>

                                  <td align="right">邮编</td>
                                  <td>
                                      <el-input v-model="addParam.postcode" style="width:200px" ref="input18" @keyup.enter.native="nextFocus(18)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <!-- <td align="right">有效</td>
                                  <td>
                                      <el-radio-group v-model="addParam.validflag" size="mini" width="100%" @input="hasChange">
                                          <el-radio :label='"1"' ref="input20" @keyup.enter.native="nextFocus(20)">有效</el-radio>
                                          <el-radio :label='"0"'>无效</el-radio>
                                      </el-radio-group>
                                  </td> -->
                              </tr>
                              <tr>
                                  <td align="right">地址</td>
                                  <td colspan="3">
                                      <el-input v-model="addParam.addr" style="width:100%" ref="input19" @keyup.enter.native="nextFocus(19)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">电子邮件</td>
                                  <td>
                                      <el-input v-model="addParam.email" style="width:200px" ref="input20" @keyup.enter.native="nextFocus(20)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                              </tr>
                              <tr>
                                  <td align="right">毕业院校</td>
                                  <td>
                                      <el-input v-model="addParam.graduated" style="width:100%" ref="input21" @keyup.enter.native="nextFocus(21)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">最高学历</td>
                                  <td>
                                      <rm-ddl-common v-model="addParam.education" datatype="seccode" kindno="educate" kindname="最高学历" dataname="最高学历" width="100%" ref="input22" @keyup.enter.native="nextFocus(22)" @change="hasChange"></rm-ddl-common>
                                  </td>
                                  <td align="right">附件数</td>
                                  <td>
                                      <table style="border-spacing:0px">
                                          <tr>
                                              <td>
                                                  <el-input v-model="addParam.education_cnt" disabled style="width:60px" @dblclick.native="OpenFileList('off_education')"></el-input>
                                              </td>
                                              <td>(双击开窗选择)</td>
                                          </tr>
                                      </table>
                                  </td>
                              </tr>
                              <tr>
                                  <td align="right">毕业时间</td>
                                  <td>
                                      <el-date-picker v-model="addParam.graduatedate" type="date" format="yyyy 年 MM 月 dd 日" style="width:100%" value-format="yyyy-MM-dd" ref="input23" @keyup.enter.native="nextFocus(23)" @input="hasChange"></el-date-picker>
                                  </td>
                                  <td align="right">最高学位</td>
                                  <td>
                                      <el-input v-model="addParam.degree" style="width:100%" ref="input24" @keyup.enter.native="nextFocus(24)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">附件数</td>
                                  <td>
                                      <table style="border-spacing:0px">
                                          <tr>
                                              <td>
                                                  <el-input v-model="addParam.degree_cnt" disabled style="width:60px" @dblclick.native="OpenFileList('off_degree')"></el-input>
                                              </td>
                                              <td>(双击开窗选择)</td>
                                          </tr>
                                      </table>
                                  </td>
                              </tr>

                              <!-- <tr>
                                  <td align="right">离职原因</td>
                                  <td>
                                      <el-input v-model="addParam.outreason" style="width:100%" ref="input27" @keyup.enter.native="nextFocus(27)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                              </tr>  -->
                              <tr>
                                  <td align="right">专业</td>
                                  <td>
                                      <el-input v-model="addParam.profession" style="width:100%" ref="input25" @keyup.enter.native="nextFocus(25)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">用工性质</td>
                                  <td>
                                      <el-select v-model="addParam.employtype"  style="width:100%" ref="input26" placeholder="请选择用工性质" @keyup.enter.native="nextFocus(26)" @change="hasChange" :disabled="true">
                                          <el-option v-for="item in employTypeOption" :key="item.value" :value="item.value" :label="item.label" ></el-option>
                                      </el-select>
                                  </td>
                                  <td align="right">基本月薪</td>
                                  <td>
                                      <el-input v-model="addParam.salary" style="width:200px" ref="input27" @keyup.enter.native="nextFocus(27)" @input="hasChange" @focus="Focus($event)" ></el-input>
                                  </td>
                              </tr>

                              <tr>
                                  <td align="right">输入码</td>
                                  <td>
                                      <el-input v-model="addParam.inputcode" style="width:100%" ref="input28" @keyup.enter.native="nextFocus(28)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">学术机构</td>
                                  <td>
                                      <el-input v-model="addParam.orgtitle" style="width:100%" ref="input29" @keyup.enter.native="nextFocus(29)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>

                              </tr>
                              <tr>
                                  <tr>


                                  <td align="right">社会团体</td>
                                  <td>
                                      <el-input v-model="addParam.societaltitle" style="width:200px" ref="input30" @keyup.enter.native="nextFocus(30)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                                  <td align="right">工作年限</td>
                                  <td>
                                      <el-input v-model="addParam.workyear" style="width:100%" ref="input31" @keyup.enter.native="nextFocus(31)" @input="hasChange" @focus="Focus($event)"></el-input>
                                  </td>
                              </tr>
                              <tr>
                                  <td style="vertical-align:top" align="right">简历</td>
                                  <td colspan="5">
                                      <el-input type=textarea :rows="3" v-model="addParam.resume" style="width:830px" ref="input32" @keyup.enter.native="nextFocus(32)" @input="hasChange"></el-input>
                                  </td>
                              </tr>
                          </table>
                          <div style="text-align: center;">
                              <el-button icon="el-icon-document" @click="btnSave('baseinfo')" :disabled="!changeflag"  type="primary">保存</el-button>
                              <el-button icon="el-icon-close" @click="btnCancel" :disabled="!changeflag">取消</el-button>
                          </div>
                  </div>
                  <template v-slot:fix>
                      <div class="middle-right" style="height:100%;color: black;">
                          <el-tabs v-model="activeTabName" @tab-click="HandleClick" style="height:100%;" type="border-card" ref="tabs" >
                              <el-tab-pane label ="角色" name="role">
                                  <div style="height: calc(100% - 300px)" class="pane-table pane-edit-table">
                                  <vxe-table show-overflow ref="jsTable" :key="jskey" :data.sync="jsList" height="400px" :sort-config="{trigger: 'cell'}"  :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" @current-change="jsCurrentChange" >
                                          <vxe-table-column type="index" title="NO." width="50" align="center"></vxe-table-column>
                                          <vxe-table-column field="rolename" sortable title="角色名称" width="120" show-overflow></vxe-table-column>
                                          <vxe-table-column field="roleno" sortable title="角色代码" width="120" show-overflow></vxe-table-column>
                                          <vxe-table-column field="empower_username" sortable title="角色授权人" width="100" show-overflow></vxe-table-column>
                                          <vxe-table-column field="empower_dt" sortable title="角色授权时间" width="125" show-overflow :formatter="['toDateString', 'yyyy-MM-dd HH:mm:ss']" align="center"></vxe-table-column>
                                          <vxe-table-column field="rolevaliditydt" sortable title="角色有效期" width="95" show-overflow :formatter="['toDateString', 'yyyy-MM-dd']" align="center"></vxe-table-column>
                                      </vxe-table>
                                  </div>
                               <div style="width: 100%; height: 300px; border: 1px solid #ccc; margin-top: 5px; overflow-x: auto" >
                                      <vxe-table show-overflow ref="jsexmTable" :key="jsexmkey" :data.sync="jsexmList" height="300px" :sort-config="{trigger: 'cell'}"  :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" >
                                                  <vxe-table-column field="exmtypename" title="考试类型" width="80" sortable></vxe-table-column>
                                                  <vxe-table-column field="testtitle" title="试卷名称" width="280" sortable></vxe-table-column>
                                                  <vxe-table-column field="maxtime" title="考试时长" width="85" sortable> </vxe-table-column>
                                                  <vxe-table-column field="scores" title="考试分数" width="85" sortable> </vxe-table-column>
                                                  <vxe-table-column field="createusername" title="出题人" width="75" sortable align="center"></vxe-table-column>
                                                  <vxe-table-column field="createdt" title="创建时间" width="125" sortable></vxe-table-column>
                                      </vxe-table>
                                    </div>

                              </el-tab-pane>
                              <el-tab-pane label="学习" name="study" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="xxTable" :key="xxkey" :data.sync="xxList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }">
                                          <vxe-table-column field="startdate" title="起始日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.startdate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="enddate" title="截止日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.enddate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="institution" title="学校名称" width="120" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="subject" title="专业" width="70" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(1)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(1)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('study')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="工作" name="work" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="gzTable" :key="gzkey" :data.sync="gzList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }">
                                          <vxe-table-column field="startdate" title="起始日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.startdate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="enddate" title="截止日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.enddate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="workdept" title="工作单位部门" width="120" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="title" title="职称职务" width="70" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(2)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(2)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('work')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="内外部培训"  style="overflow-y:auto">
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="pxTable" :key="pxkey" :data.sync="pxList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }">
                                          <vxe-table-column field="startdate" title="起始日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.startdate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="enddate" title="截止日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.enddate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>

                                          <vxe-table-column field="traintype" title="类型" width="120">
                                              <template v-slot="{ row }">
                                                  <el-select v-model="row.traintype" placeholder="" @change="hasChange">
                                                      <el-option v-for="item in traintypeOption " :key="item.value" :label="item.label" :value="item.value" filterable>
                                                      </el-option>
                                                  </el-select>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="trainplace" title="培训地址" width="140" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="traincontent" title="培训内容" width="200" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="organizers" title="举办单位" width="100" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(3)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(3)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('train')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="奖惩" name="reward" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="jcTable" :key="jckey" :data.sync="jcList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }">
                                          <vxe-table-column field="rewarddate" title="日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.rewarddate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="rewardflag" title="奖惩标志" width="80">
                                              <template v-slot="{row}">
                                                  <el-select v-model="row.rewardflag" placeholder="奖惩标志" @change="hasChange">
                                                      <el-option v-for="item in rewardOption" :key="item.value" :label="item.label" :value="item.value"></el-option>
                                                  </el-select>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="rewardcontent" title="奖惩内容" width="160" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="organizers" title="奖惩部门级别" width="80" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <!-- <el-button @click="btnDetailAdd(4)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(4)" class="el-button--310">删除明细</el-button> -->
                                                  <el-button icon="el-icon-document" @click="btnSave('reward')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="继续教育" name="education" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="zjyTable" :key="zjykey" :data.sync="zjyList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }">
                                          <vxe-table-column field="startdate" title="起始日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.startdate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="enddate" title="截止日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.enddate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="traincontent" title="培训内容" width="160" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="credit" title="学分" width="60" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="organizers" title="举办单位" width="70" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(5)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(5)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('education')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="论文" name="paper" style="overflow-y:auto">
                                      <div style="height: calc(100% - 260px)" class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="lwTable" :key="lwkey" :data.sync="lwList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }" @current-change="lwCurrentChange">
                                          <vxe-table-column field="paperdate" title="论文日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.paperdate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>

                                          <vxe-table-column field="papertitle" title="论文题目" width="100" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="magazine" title="杂志名称/期/起止页" width="140" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="level" title="级别" width="60" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="rank" title="排名" width="80" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(6)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(6)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('paper')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                       </div>
                                      <div style="width: 100%; height: 255px; border: 1px solid #ccc; margin-top: 5px; overflow-x: auto" >
                                          <table style="height: 220px">
                                                  <tr>
                                                      <td v-for="(image, index) in paperImageList" :key="index" style="text-align: left">
                                                          <div @click="imagechange(image, index)" @dblclick="ShowClearImage(image, index)" :style="{ border: paperImageIndex[index] ? '1px solid red' : '1px solid white' }">
                                                              <el-image style="width: 150px; height: 180px; z-index: auto" :src="image.url"></el-image>
                                                          </div>
                                                      </td>
                                                  </tr>
                                              </table>
                                               <table class="upload-img">
                                                      <tr style="width: 100%;">
                                                          <td style="width: 300px;text-align: right;">
                                                              <el-upload class="upload-demo" action="" :auto-upload="true" accept="image/*" :show-file-list="false" :http-request="uploadimage"  >
                                                                  <el-button size="small" >新增</el-button>
                                                              </el-upload>

                                                          </td>
                                                          <td class="upload-demo" >
                                                              <el-button @click="DelImage()">删除</el-button>
                                                          </td>
                                                      </tr>
                                                  </table>
                                          </div>
                              </el-tab-pane>
                              <el-tab-pane label="著作" name="book" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div style="height: calc(100% - 260px)" class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="zzTable" :key="zzkey" :data.sync="zzList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }" @current-change="zzCurrentChange">
                                          <vxe-table-column field="bookdate" title="出版日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.bookdate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="bookname" title="书名" width="120" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="publisher" title="出版社" width="140" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="roles" title="编写单位" width="160" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="writesummary" title="编写页码/字数" width="140" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(7)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(7)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('book')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                                  <div style="width: 100%; height: 255px; border: 1px solid #ccc; margin-top: 5px; overflow-x: auto" >
                                          <table style="height: 220px">
                                                  <tr>
                                                      <td v-for="(image, index) in bookImageList" :key="index" style="text-align: left">
                                                          <div @click="imagechange(image, index)" @dblclick="ShowClearImage(image, index)" :style="{ border: bookImageIndex[index] ? '1px solid red' : '1px solid white' }">
                                                              <el-image style="width: 150px; height: 180px; z-index: auto" :src="image.url"></el-image>
                                                          </div>
                                                      </td>
                                                  </tr>
                                              </table>
                                               <table class="upload-img">
                                                      <tr style="width: 100%;">
                                                          <td style="width: 300px;text-align: right;">
                                                              <el-upload class="upload-demo" action="" :auto-upload="true" accept="image/*" :show-file-list="false" :http-request="uploadimage"  >
                                                                  <el-button size="small" >新增</el-button>
                                                              </el-upload>

                                                          </td>
                                                          <td class="upload-demo" >
                                                              <el-button @click="DelImage()">删除</el-button>
                                                          </td>
                                                      </tr>
                                                  </table>
                                          </div>
                              </el-tab-pane>
                              <el-tab-pane label="专利" name="patent" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div style="height: calc(100% - 260px)" class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="zlTable" :key="zlkey" :data.sync="zlList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }" @current-change="zlCurrentChange">
                                          <vxe-table-column field="patent_dt" title="获取时间" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template   v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.patent_dt" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="patent_name" title="专利名称" width="120" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="validity_dt" title="有效期至" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template   v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.validity_dt" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="short_content" title="内容简介" width="140" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="remarks" title="备注" width="160" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(15)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(15)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('patent')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                                  <div style="width: 100%; height: 255px; border: 1px solid #ccc; margin-top: 5px; overflow-x: auto" >
                                          <table style="height: 220px">
                                                  <tr>
                                                      <td v-for="(image, index) in patentImageList" :key="index" style="text-align: left">
                                                          <div @click="imagechange(image, index)" @dblclick="ShowClearImage(image, index)" :style="{ border: patentImageIndex[index] ? '1px solid red' : '1px solid white' }">
                                                              <el-image style="width: 150px; height: 180px; z-index: auto" :src="image.url"></el-image>
                                                          </div>
                                                      </td>
                                                  </tr>
                                              </table>
                                               <table class="upload-img">
                                                      <tr style="width: 100%;">
                                                          <td style="width: 300px;text-align: right;">
                                                              <el-upload class="upload-demo" action="" :auto-upload="true" accept="image/*" :show-file-list="false" :http-request="uploadimage"  >
                                                                  <el-button size="small" >新增</el-button>
                                                              </el-upload>

                                                          </td>
                                                          <td class="upload-demo" >
                                                              <el-button @click="DelImage()">删除</el-button>
                                                          </td>
                                                      </tr>
                                                  </table>
                                          </div>
                              </el-tab-pane>
                              <el-tab-pane label="成果" name="achievement" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="cgTable" :key="cgkey" :data.sync="cgList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }">
                                          <vxe-table-column field="archievedate" title="成果日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.archievedate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="archievement" title="成果名称" width="120" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="appraiselevel" title="鉴定水平" width="120" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="archievement" title="获奖部门、等次、编号" width="160" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(8)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(8)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('achievement')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="课题" name="topic" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="ktTable" :key="ktkey" :data.sync="ktList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }">
                                          <vxe-table-column field="startdate" title="课题日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.startdate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <!-- <vxe-table-column field="enddate" title="截止日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.enddate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column> -->
                                          <vxe-table-column field="issuename" title="课题名称" width="120" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="issuesource" title="任务来源" width="120" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="ranks" title="排名等" width="80" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(9)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(9)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('topic')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="考核记录" name="exm" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="khjlTable" :key="khjlkey" :data.sync="khjlList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }" @current-change="khjlcurrentChangeEvent">
                                          <vxe-table-column field="rwtype" title="考核类型" width="80"> <template v-slot="{ row }">
                                                  <el-select v-model="row.rwtype" placeholder="" @change="hasChange">
                                                      <el-option v-for="item in rwtypeOption " :key="item.value" :label="item.label" :value="item.value" filterable>
                                                      </el-option>
                                                  </el-select>
                                              </template></vxe-table-column>
                                          <vxe-table-column field="rwdate" title="年份/月份" width="80" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="rwcore" title="考核得分" width="80" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="rwresults" title="考核结果" width="90"><template v-slot="{ row }">
                                                  <el-select v-model="row.rwresults" placeholder="" @change="hasChange" clearable>
                                                      <el-option v-for="item in rwResultsOption " :key="item.value" :label="item.label" :value="item.value" filterable>
                                                      </el-option>
                                                  </el-select>
                                              </template></vxe-table-column>
                                          <vxe-table-column field="medicalethics" title="医德医风" width="90"><template v-slot="{ row }">
                                                  <el-select v-model="row.medicalethics" placeholder="" @change="hasChange" clearable>
                                                      <el-option v-for="item in medicalethicsOption " :key="item.value" :label="item.label" :value="item.value" filterable>
                                                      </el-option>
                                                  </el-select>
                                              </template></vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <vxe-table-column field="testid" title="考试ID" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(14)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(14)" class="el-button--310" v-if="isallowdel">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('exm')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="培训记录" name="train" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="pxjlTable" :key="pxjlkey" :data.sync="pxjlList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName">
                                          <vxe-table-column type="index" title="NO." width="50" align="center"></vxe-table-column>
                                          <vxe-table-column field="train_dt" title="培训时间" width="175" sortable>
                                          </vxe-table-column>
                                          <vxe-table-column field="place" title="地点" width="140" sortable></vxe-table-column>
                                          <vxe-table-column field="theme" title="主题" width="160" sortable></vxe-table-column>
                                          <vxe-table-column field="content" title="内容" width="250" sortable></vxe-table-column>
                                          <vxe-table-column field="modename" title="方式" width="100" sortable align="center"></vxe-table-column>
                                          <vxe-table-column field="liable_username" title="培训负责人" width="120" sortable></vxe-table-column>
                                          <vxe-table-column field="relationtypename" title="关联类型" width="100" sortable  align="center"></vxe-table-column>
                                          <vxe-table-column field="relationid" title="关联id" width="120" sortable></vxe-table-column>
                                          <vxe-table-column field="roleids" title="涉及角色" width="120" sortable></vxe-table-column>
                                          <vxe-table-column field="addusername" title="添加人" width="70" sortable ></vxe-table-column>
                                          <vxe-table-column field="add_dt" title="添加时间" width="120" sortable ></vxe-table-column>

                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="专业轮转" name="rotation" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="zylzTable" :key="zylzkey" :data.sync="zylzList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }">
                                          <vxe-table-column field="startdate" title="起始日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.startdate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="enddate" title="截止日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.enddate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="groupname" title="专业岗位" width="120" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="labgroupid" title="检验组ID" width="60" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(10)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(10)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('rotation')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="上岗资格证" name="certificate" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="sgzgzTable" :key="sgzgzkey" :data.sync="sgzgzList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }">
                                          <vxe-table-column field="certifname" title="证件名称" width="120" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="certifno" title="证件号" width="100" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="certiforg" title="发证单位" width="120" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="certifdate" title="发证日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.certifdate" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="description" title="备注" width="220" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="seq" title="序号" width="40"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(11)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(11)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('certificate')" >保存</el-button>
                                                  <el-button @click="OpenFileList('off_certif')" class="el-button--310">上岗资格证书</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="休假记录" name="holiday" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="xjjlTable" :key="xjjlkey" :data.sync="xjjlList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }">
                                          <vxe-table-column field="lrstartdt" title="休假起始日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.lrstartdt" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="lrenddt" title="休假结束日期" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.lrenddt" align="right" type="date" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="lrdays" title="天数" width="50" header-align="center" align="right" :edit-render="{name:'input',events: {change: hasChange},}"></vxe-table-column>
                                          <vxe-table-column field="lrtype" title="休假类别" width="120"> <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <rm-ddl-common v-model="row.lrtype" datatype="seccode" kindno="offleavetype" kindname="休假类别" dataname="休假类别" width="100%" ref="input15" @change="hasChange"></rm-ddl-common>
                                                  </div>
                                              </template></vxe-table-column>
                                          <vxe-table-column field="createuserna" title="登记人" width="70" align="center"></vxe-table-column>
                                          <vxe-table-column field="create_dt" title="登记时间" width="130" align="center"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(13)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(13)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('holiday')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label="年假安排" name="leave" style="overflow-y:auto">
                                  <!-- @tab-click="HandleClick" -->
                                  <div class="pane-table pane-edit-table">
                                      <vxe-table show-overflow ref="njjlTable" :key="njjlkey" :data.sync="njjlList" height="auto" :sort-config="{trigger: 'cell'}" :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" :edit-config="{ trigger: 'click', mode: 'cell', showStatus: true, showIcon: false }">
                                          <vxe-table-column field="empyears" title="归属年份" width="110" :formatter="['toDateString', 'yyyy/MM/dd']" sortable>
                                              <template width="100" v-slot="{row}">
                                                  <div class="block; padding:0px 0px 0px 0px">
                                                      <el-date-picker v-model="row.empyears" align="right" type="year" style="middle-center" @change="hasChange">
                                                      </el-date-picker>
                                                  </div>
                                              </template>
                                          </vxe-table-column>
                                          <vxe-table-column field="holidaycount" title="年假天数" width="80" :edit-render="{name:'input',events: {change: hasChange},}" text-align="right"></vxe-table-column>
                                          <vxe-table-column field="modifyusername" title="修改人" width="70" align="center"></vxe-table-column>
                                          <vxe-table-column field="modifydt" title="修改时间" width="130" align="center"></vxe-table-column>
                                          <template v-slot:fix>
                                              <div style="font-size:17px;padding:3px;background-color:#fff;text-align:center;font-weight:bold">
                                                  <el-button @click="btnDetailAdd(12)" class="el-button--310">新增明细</el-button>
                                                  <el-button @click="btnDetailDel(12)" class="el-button--310">删除明细</el-button>
                                                  <el-button icon="el-icon-document" @click="btnSave('leave')" >保存</el-button>
                                              </div>
                                          </template>
                                      </vxe-table>
                                  </div>
                              </el-tab-pane>
                              <el-tab-pane label ="评估记录" name="estimate">
                                  <div style="width: 100%;height: calc(100% - 300px);overflow-x: auto" class="pane-table pane-edit-table">
                                  <vxe-table show-overflow ref="pgjlTable" :key="pgjlkey" :data.sync="pgjlList" height="400px" :sort-config="{trigger: 'cell'}"  :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" @current-change="pgjlCurrentChange" >
                                          <vxe-table-column type="index" title="NO." width="50" align="center"></vxe-table-column>
                                          <vxe-table-column field="testtitle" sortable title="考试名称" width="160" show-overflow></vxe-table-column>
                                          <vxe-table-column field="stime" sortable title="考试时间" width="80" show-overflow :formatter="['toDateString', 'yyyy-MM-dd']" align="center"></vxe-table-column>
                                          <vxe-table-column field="scores" sortable title="考试得分" width="80" show-overflow></vxe-table-column>
                                          <vxe-table-column field="estimate_username" sortable title="评估人" width="60" show-overflow></vxe-table-column>
                                          <vxe-table-column field="oper_date" sortable title="评估日期" width="80" show-overflow :formatter="['toDateString', 'yyyy-MM-dd']" align="center"></vxe-table-column>
                                          <vxe-table-column field="statename" sortable title="评估状态" width="60" show-overflow></vxe-table-column>
                                          <vxe-table-column field="conclusion" sortable title="评估结论" width="200" show-overflow></vxe-table-column>
                                      </vxe-table>
                                  </div>
                               <div style="width: 100%; height: 300px; border: 1px solid #ccc; margin-top: 5px; overflow-x: auto" >
                                      <vxe-table show-overflow ref="pgjlmTable" :key="pgjlmkey" :data.sync="pgjlmList" height="300px" :sort-config="{trigger: 'cell'}"  :keyboard-local-config="keyLocalConfig" border size="mini" show-header-overflow highlight-current-row resizable stripe header-align="center" :row-class-name="rowClassName" >
                                          <vxe-table-column type="index" title="NO." width="50" align="center"></vxe-table-column>
                                                  <vxe-table-column field="itemname" title="评估内容" width="250" sortable></vxe-table-column>
                                                  <vxe-table-column field="ispassname" title="是否合格" width="90" sortable> </vxe-table-column>
                                      </vxe-table>
                                    </div>
                              </el-tab-pane>
                          </el-tabs>
                      </div>
                      <el-dialog v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="登录代码选择" :visible.sync="bPopUserNo" v-if="bPopUserNo" :keyboard-local-config="keyLocalConfig">
                          <rm-pop-common @change="UserNoRowChange" @cancel="bPopUserNo = false" datatype="userinfo"></rm-pop-common>
                      </el-dialog>
                  </template>
              </rm-layout-right>
          </div>

      </div>
      <!--附件管理选择--->
      <el-dialog width="900px" :append-to-body="true" :close-on-click-modal="false" title="附件管理" :visible.sync="dialogfilelist" :destroy-on-close="true">
          <div style="height:400px">
              <div style="height:38px;border:1px solid #CCC">
                  <table class="table1style">
                      <tr>
                          <td>根目录名称：</td>
                          <td style="color:blue"><u>主任办公</u></td>
                          <td>子目录名称：</td>
                          <td style="color:blue"><u>{{offname}}</u></td>
                          <td>子目录代码：</td>
                          <td style="color:blue"><u>{{offcode}}</u></td>
                          <td style="padding-left:70px">
                              <el-button icon="el-icon-search" @click="btnimgQuery" type="primary">查询</el-button>
                          </td>
                          <td>
                              <el-button icon="el-icon-plus" @click="btnimgAdd" ref="importFile">新增</el-button>
                          </td>
                          <td>
                              <div class="upload-button">
                                  <el-upload ref="upload" :action="url" accept="*" :on-change="fileChange" :http-request="uploadOpt">
                                      <el-button size="small" plain>新增</el-button>
                                  </el-upload>
                              </div>
                          </td>
                          <td>
                              <el-button icon="el-icon-delete" @click="btnimgDelete">删除</el-button>
                          </td>
                          <td>
                              <el-button icon="el-icon-document" @click="btnimgSave">保存</el-button>
                          </td>
                          <td>
                              <el-button icon="el-icon-zoom-in" @click="getpic" type="primary">预览</el-button>
                          </td>
                          <td>
                              <el-button icon="el-icon-close" @click="btnimgCancel">退出</el-button>
                          </td>
                      </tr>
                  </table>
              </div>
              <div style="height:calc(100% - 50px);width:100%;margin-top:5px">
                  <vxe-table :loading="imgloading" :data.sync="secimageData" :row-class-name="rowClassName" border fit :mouse-config="{selected: true}" :edit-config="{trigger: 'click', mode: 'cell',showStatus: true,showIcon:true}" :keyboard-config="keyConfig" height="auto" header-align="center" highlight-current-row highlight-hover-row ref="popxTable" resizable show-header-overflow="tooltip" show-overflow="tooltip" size="mini" stripe @current-change="offCurrentChange">
                      <vxe-table-column type="index" title="NO." width="40" sortable align="center"></vxe-table-column>
                      <vxe-table-column field="fileno" title="文件编号" width="100" sortable align="center"></vxe-table-column>
                      <vxe-table-column field="filename" title="文件名称" width="100" sortable></vxe-table-column>
                      <vxe-table-column field="comments" title="备注" width="150" sortable :edit-render="{name:'input', autoselect:true}"></vxe-table-column>
                      <vxe-table-column field="createtime" title="创建时间" width="120" sortable align="center"></vxe-table-column>
                      <vxe-table-column field="createuser" title="创建人" width="50" sortable align="center"></vxe-table-column>
                      <vxe-table-column field="filetype" title="文件类型" width="70" sortable></vxe-table-column>
                      <!-- <vxe-table-column field="filedesc" title="文件描述" width="90" sortable></vxe-table-column> -->
                      <vxe-table-column field="recordid" title="对应记录ID" width="90" sortable align="center"></vxe-table-column>
                      <vxe-table-column field="fileid" title="文件ID" width="70" sortable align="center"></vxe-table-column>
                      <vxe-table-column field="fileclassid" title="文件分类ID" width="70" sortable align="center"></vxe-table-column>
                  </vxe-table>

              </div>
          </div>
      </el-dialog>
      <!-- width="500px" -->
      <el-dialog width="712px" :append-to-body="true" :close-on-click-modal="false" title="查看" :visible.sync="bShowPic" :destroy-on-close="true"> <img v-if="PhotoImageUrl" :src="PhotoImageUrl" fit="scale-down" style="width: 700px; height: 500px" :preview-src-list="PhotoImageUrlList" />
          <i v-else class="el-icon-plus avatar-uploader-icon"></i>
      </el-dialog>
      <el-dialog width="900px" v-el-drag-dialog :append-to-body="true" :close-on-click-modal="false" title="清晰图片" :visible.sync="dialogimgVisible" :destroy-on-close="true">
          <el-image :src="[selectclearimage]" :preview-src-list="[selectclearimage]"   style="width: 100%; height: 100%; z-index: auto" fit="contain" @click="ShowClearImage(selectname, selectseq)">
                                  <div slot="error" style="height: 100%; text-align: center"></div>
                              </el-image>
      </el-dialog>
  </div>
</template>

<script type="text/javascript">
import XE from "xe-utils";
XE.mixin({
  // 自定义全局的格式化处理函数
  formatSelect(cellValue, list) {
      let item = list.find((item) => item.data == cellValue);
      return item ? item.display : cellValue;
  },
});
export default {
  name: "personalhomepage",
  data() {
      return {
          keyLocalConfig: {
              isArrow: true,
          },
          emplyList: [], //左侧表格数据
          bLoading: false,
          bAddOpen: false, //仅新增可修改数据
          changeflag: false, //数据改变标志用于button和搜索窗的disabled
          bPopUserNo: false, //员工代码dialog
          selrow: {}, //选中行
          temprow: {}, //用于新增后取消操作后获取数据的选中行
          searchParam: {
              //查询条件
              labdeptcode: "",
              hospcode: "",
              labgroupid: "",
              validflag: 2,
              allFiliter: "",
          },
          xxkey: 0, //xxkey-njjkey为12tab页的key值，用于获取vxetable高度
          gzkey: 0,
          pxkey: 0,
          jckey: 0,
          zjykey: 0,
          lwkey: 0,
          zzkey: 0,
          zlkey: 0,
          cgkey: 0,
          ktkey: 0,
          zylzkey: 0,
          sgzgzkey: 0,
          njjlkey: 0,
          khjlkey: 0,
          pxjlkey:0,
          xjjlkey: 0,
          jskey: 0,
          jsexmkey: 0,
          pgjlkey: 0,
          pgjlmkey: 0,
          addParam: {}, // 右侧基本信息tab页数据
          faddParam: {},
          userNoRow: {}, //用户代码当前选中行
          tempuserno: {}, //拷贝的当前用户代码
          operatetype: 2, //1:新增 2:修改 3:删除
          activeTabName: "role", //默认tab页
          labdeptOption: [], //检验科室    后台查询获取
          labgroupOption: [], //工作组         后台查询获取
          hospOption: [], //医院              后台查询获取
          educationOption: [], //最高学历    后台查询获取
          titleOption: [], //职称             后台查询获取
          jobTitle: [], //职务             后台查询获取
          politicalStatusOption: [], //政治面貌  后台查询获取
          coloursenseOption: [], //色觉            后台查询获取
          offleavetypeOption: [], //休假类别
          //考核记录
          aboOption: [
              //NUABO血型
              { value: "A", label: "A型" },
              { value: "B", label: "B型" },
              { value: "AB", label: "AB型" },
              { value: "O", label: "O型" },
          ],
          rhOption: [
              //rh血型
              { value: "-", label: "阴性" },
              { value: "+", label: "阳性" },
          ],
          marriageOption: [
              //婚否
              { value: "0", label: "未婚" },
              { value: "1", label: "已婚" },
              { value: "2", label: "离异" },
              { value: "3", label: "丧偶" },
          ],
          rewardOption: [
              //奖惩 默认 奖励
              { value: "1", label: "奖励" },
              { value: "0", label: "惩罚" },
          ],
          sexOption: [
              //性别
              { value: "1", label: "男" },
              { value: "2", label: "女" },
          ],
          employTypeOption: [
              //员工类别/用工性质
              { value: "在岗", label: "在岗" },
              { value: "新轮岗", label: "新轮岗" },
              { value: "培训学员", label: "培训学员" },
              { value: "进修人员", label: "进修人员" },
              { value: "其他", label: "其他" },
          ],
          traintypeOption: [
              { value: "1", label: "内部" },
              { value: "2", label: "外部" },
          ],
          rwtypeOption: [
              { value: "1", label: "年度" },
              { value: "2", label: "月度" },
          ],
          rwResultsOption: [
              { value: "1", label: "优秀" },
              { value: "2", label: "良好" },
              { value: "3", label: "合格" },
              { value: "4", label: "不合格" },
          ],
          medicalethicsOption: [
              { value: "1", label: "优秀" },
              { value: "2", label: "良好" },
              { value: "3", label: "合格" },
              { value: "4", label: "不合格" },
          ],
          AddData: [], //新增数据 用于变色
          xxList: [], //tab页的vxetable数据
          gzList: [],
          pxList: [],
          jcList: [],
          zjyList: [],
          lwList: [],
          zzList: [],
          zlList: [],
          cgList: [],
          ktList: [],
          zylzList: [],
          sgzgzList: [],
          njjlList: [],
          xjjlList: [],
          khjlList: [],
          pxjlList:[],
          jsList:[],
          jsexmList:[],
          pgjlList:[],
          pgjlmList:[],
          form: {},
          totalcount: 0, //总条数
          keyConfig: {
              isArrow: true,
              isDel: true,
              isTab: true,
              isEdit: true,
          },
          //图片附件
          dialogExport: false,
          dialogfilelist: false,
          imgloading: false,
          secimageData: [],
          url: "",
          form: {},
          inv_certificate: {},
          offcode: "",
          offname: "",
          offcurrow: {}, //附件选中行
          PhotoImageUrl: "",
          PhotoImageUrlList: [],
          bShowPic: false,
          paperImageList:[], // 论文照片集
          paperImageIndex:[],
          bookImageList:[], // 著作照片集
          bookImageIndex:[],
          patentImageList:[], // 专利照片集
          patentImageIndex:[],
          tabname:"",//页签名称
          curselectrow:"",//选中的行
          //
          dialogimgVisible:false,
          imagecomm: "", //图片备注
          selectimage: "", //选中图像
          selectname: "", //选中图像名称
          selectclearimage: "", //选中图像清晰图片
          selectseq: "", //选中图像序号
          selectimgid:"",// 选中图像ID
          loginuserno: this.$tool.getSession(this.$tool.loginuserno),
          personImageUrl: "",
          agestr:"",
          isallowdel:true,
      };
  },
  created() {
      this.initOption();
      this.detailQuery(this.loginuserno);
  },
  mounted() {
      this.url = this.$tool.baseUrl.replace(/api/, "z") + "fileupload";
  },
  methods: {
      /*********************按钮类*******************/
      //主表查询，右侧基本信息tab页查询

      //子表查询，右侧12tab页数据
      detailQuery(employeeno) {
          this.$tool
              .request({
                  url: "ucent/personalhomepage",
                  method: "post",
                  data: {
                      action: "detailquery",
                      employeeno: employeeno,
                  },
              })
              .then((res) => {
                  if (res.errcode == 1) {
                      if(res.dt.length > 0){
                          this.addParam = res.dt[0];

                      }
                      this.agestr=res.agestr;
                      this.personImageUrl = res.photourl;
                      this.xxList = res.oestudy;
                      this.gzList = res.oework;
                      this.pxList = res.oetrain;
                      this.jcList = res.oereward;
                      this.zjyList = res.oeteach;
                      this.lwList = res.oepaper;
                      this.zzList = res.oebook;
                      this.zlList = res.oepatent;
                      this.cgList = res.oearchieve;
                      this.ktList = res.oeissue;
                      this.zylzList = res.oecycle;
                      this.sgzgzList = res.oecertif;
                      this.njjlList = res.oeholiday;
                      this.xjjlList = res.oeleaverecord;
                      this.khjlList = res.oereview;
                      this.pxjlList =res.exmtrain;
                      this.jsList =res.rolelist;
                      if(res.rolelist.length > 0){
                          this.$nextTick(() => {
                              this.$refs.jsTable.setCurrentRow(res.rolelist[0]);
                              this.getjsexminfo(this.loginuserno,res.rolelist[0].roleno);
                          })
                      }
                      this.pgjlList =res.estimatelist;
                      if(res.estimatelist.length > 0){
                          this.$nextTick(() => {
                              this.$refs.pgjlTable.setCurrentRow(res.estimatelist[0]);
                              this.getestimatedetail(res.estimatelist[0].estimateid);
                          })
                      }
                      this.xxkey++;
                      this.gzkey++;
                      this.pxkey++;
                      this.jckey++;
                      this.zjykey++;
                      this.lwkey++;
                      this.zzkey++;
                      this.zlkey++;
                      this.cgkey++;
                      this.ktkey++;
                      this.zylzkey++;
                      this.sgzgzkey++;
                      this.njjlkey++;
                      this.xjjlkey++;
                      this.khjlkey++;
                      this.pxjlkey++;
                      this.jskey++;
                      this.jsexmkey++;
                      this.pgjlkey++;
                      this.pgjlmkey++;
                      switch (this.tabname) {
                          case "paper": // 论文
                              if(this.lwList.length >0){
                                  this.$nextTick(() => {
                                      this.$refs.lwTable.setCurrentRow(this.lwList[0]);
                                      this.curselectrow = this.lwList[0];
                                      this.QueryImage(1);
                                  })
                              }
                              break;
                          case "book": // 著作
                              if(this.zzList.length >0){
                                      this.$nextTick(() => {
                                          this.$refs.zzTable.setCurrentRow(this.zzList[0]);
                                          this.curselectrow = this.zzList[0];
                                          this.QueryImage(1);
                                      })
                                  }
                              break;
                          case "patent": // 专利
                              if(this.zlList.length >0){
                                  this.$nextTick(() => {
                                      this.$refs.zzTable.setCurrentRow(this.zlList[0]);
                                      this.curselectrow = this.zlList[0];
                                      this.QueryImage(1);
                                  })
                              }
                              break;
                          case "estimate": // 评估记录
                              if(this.pgjlList.length >0){
                                  this.$nextTick(() => {
                                      this.$refs.pgjlTable.setCurrentRow(this.pgjlList[0]);
                                      this.curselectrow = this.pgjlList[0];
                                      this.getestimatedetail(res.pgjlList[0].estimateid);
                                  })
                              }
                              break;
                          default:
                              break;
                      }
                  }
              })
              .catch((e) => {});
      },
      imagebefore(file) {
          const isLt2M = file.size / 1024 / 1024 < 2;
          const isJPG = file.raw.type == "image/png" || file.raw.type == "image/jpeg" || file.raw.type == "image/jpg";
          if (!isJPG) {
              this.$message.error("只能上传图片格式(png,jpeg,jpg)!");
          }
          if (!isLt2M) {
              this.$message.error("上传图片大小不能超过 2MB!");
          }
          return isJPG && isLt2M;
      },
      //重置查询信息
      btnRefresh() {
          this.searchParam = {
              labdeptcode: "",
              hospcode: "",
              labgroupid: "",
              validflag: 2,
              allFiliter: "",
          };

      },


      //保存
      btnSave(tabname) {
          this.saveAllData(tabname);
      },
      //取消
      btnCancel() {
          this.$confirm("确定取消当前修改?", "提示", {
              confirmButtonText: "确定",
              cancelButtonText: "取消",
              type: "warning",
          }).then(() => {
              this.detailQuery(this.loginuserno);
          });
      },
      //新增明细，根据flag获取对应tab页所需新增的数据
      btnDetailAdd(flag) {
          var tableNa = "";
          var healthkind = "";
          let insertRow = {};
          if (flag == 1) {
              tableNa = "xxTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  description:"",
                  startdate: XE.toDateString(new Date(), "yyyy-MM-dd"),
              };
          } else if (flag == 2) {
              tableNa = "gzTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  startdate: XE.toDateString(new Date(), "yyyy-MM-dd"),
              };
          } else if (flag == 3) {
              tableNa = "pxTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  startdate: XE.toDateString(new Date(), "yyyy-MM-dd"),
                  rewardflag: "1",
              };
          } else if (flag == 4) {
              tableNa = "jcTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  rewardflag: "1",
                  rewarddate: XE.toDateString(new Date(), "yyyy-MM-dd"),
              };
          } else if (flag == 5) {
              tableNa = "zjyTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  startdate: XE.toDateString(new Date(), "yyyy-MM-dd"),
              };
          } else if (flag == 6) {
              tableNa = "lwTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  paperdate: XE.toDateString(new Date(), "yyyy-MM-dd"),
              };
          } else if (flag == 7) {
              tableNa = "zzTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  bookdate: XE.toDateString(new Date(), "yyyy-MM-dd"),
              };
          } else if (flag == 8) {
              tableNa = "cgTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  archievedate: XE.toDateString(new Date(), "yyyy-MM-dd"),
              };
          } else if (flag == 9) {
              tableNa = "ktTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  startdate: XE.toDateString(new Date(), "yyyy-MM-dd"),
              };
          } else if (flag == 10) {
              tableNa = "zylzTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  startdate: XE.toDateString(new Date(), "yyyy-MM-dd"),
              };
          } else if (flag == 11) {
              tableNa = "sgzgzTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  certifdate: XE.toDateString(new Date(), "yyyy-MM-dd"),
              };
          } else if (flag == 12) {
              tableNa = "njjlTable";
              insertRow = {
                  employeeno: this.loginuserno,
              };
          } else if (flag == 13) {
              tableNa = "xjjlTable";
              insertRow = {
                  employeeno: this.loginuserno,
              };
          } else if (flag == 14) {
              tableNa = "khjlTable";
              insertRow = {
                  employeeno: this.loginuserno,
                  rwtype: "1",
              };
          } else if (flag == 15) {
              tableNa = "zlTable";
              insertRow = {
                  employeeno: this.loginuserno,
              };
          }else {
              return false;
          }
          console.log("🐮🍺Kanpai~123");
          this.tableRowInsert(tableNa, insertRow);
      },
      //删除明细，根据flag对应删除
      btnDetailDel(flag) {
          if (flag == 1) this.tableRowRemove("xxTable");
          else if (flag == 2) this.tableRowRemove("gzTable");
          else if (flag == 3) this.tableRowRemove("pxTable");
          else if (flag == 4) this.tableRowRemove("jcTable");
          else if (flag == 5) this.tableRowRemove("zjyTable");
          else if (flag == 6) this.tableRowRemove("lwTable");
          else if (flag == 7) this.tableRowRemove("zzTable");
          else if (flag == 8) this.tableRowRemove("cgTable");
          else if (flag == 9) this.tableRowRemove("ktTable");
          else if (flag == 10) this.tableRowRemove("zylzTable");
          else if (flag == 11) this.tableRowRemove("sgzgzTable");
          else if (flag == 12) this.tableRowRemove("njjlTable");
          else if (flag == 13) this.tableRowRemove("xjjlTable");
          else if (flag == 14) this.tableRowRemove("khjlTable");
          else if (flag == 15) this.tableRowRemove("zlTable");
          else return false;
      },
      //保存所有数据
      saveAllData(tabname) {

          var that = this;

          if (that.addParam.employeename == undefined || that.addParam.employeename == "") {
              that.$message.warning("请输入员工姓名");
              // 添加跳转聚焦
              if (that.activeTabName != "baseinfo") that.activeTabName = "baseinfo";
              that.nextFocus(3);
              return false;
          }
          that.saveData(tabname).then((response) => {
              //保存完成后操作
              if (response.errcode != "1") {
                  that.$message.error("保存失败！" + response.errmsg);
              } else {
                  that.$message.success("保存成功！");
                  that.changeflag = false;

                  that.detailQuery(this.loginuserno);
              }
          });
      },
      //保存数据
      saveData(tabname) {
          var response = this.$tool.request({
              url: "ucent/personalhomepage",
              method: "post",
              data: {
                  action: "savedata",
                  operatetype: this.operatetype,
                  employeeno: this.loginuserno,
                  tabname:tabname,
                  oemply: this.addParam,
                  oestudy: this.updateMainKey(this.$refs.xxTable.getRecordset()),
                  oework: this.updateMainKey(this.$refs.gzTable.getRecordset()),
                  oetrain: this.updateMainKey(this.$refs.pxTable.getRecordset()),
                  oereward: this.updateMainKey(this.$refs.jcTable.getRecordset()),
                  oeteach: this.updateMainKey(this.$refs.zjyTable.getRecordset()),
                  oepaper: this.updateMainKey(this.$refs.lwTable.getRecordset()),
                  oebook: this.updateMainKey(this.$refs.zzTable.getRecordset()),
                  oepatent: this.updateMainKey(this.$refs.zlTable.getRecordset()),
                  oearchieve: this.updateMainKey(this.$refs.cgTable.getRecordset()),
                  oeissue: this.updateMainKey(this.$refs.ktTable.getRecordset()),
                  oecycle: this.updateMainKey(this.$refs.zylzTable.getRecordset()),
                  oecertif: this.updateMainKey(this.$refs.sgzgzTable.getRecordset()),
                  oeholiday: this.updateMainKey(this.$refs.njjlTable.getRecordset()),
                  oeleaverecord: this.updateMainKey(this.$refs.xjjlTable.getRecordset()),
                  oereview: this.updateMainKey(this.$refs.khjlTable.getRecordset()),
              },
          });
          return response;
      },
      //获取tab页的records
      updateMainKey(tableRecords) {
          if (tableRecords.insertRecords.length > 0) {
              tableRecords.insertRecords.forEach((element) => {
                  element.employeeno = this.loginuserno;
              });
          }
          if (tableRecords.removeRecords.length > 0) {
              tableRecords.removeRecords.forEach((element) => {
                  element.employeeno = this.loginuserno;
              });
          }
          if (tableRecords.updateRecords.length > 0) {
              tableRecords.updateRecords.forEach((element) => {
                  element.cdata.employeeno = this.loginuserno;
                  element.odata.employeeno = this.loginuserno;
              });
          }
          return tableRecords;
      },
      //新增明细通用方法
      tableRowInsert(tableName, insertRow) {
          this.$refs[tableName]
              .insert({
                  ...insertRow,
              })
              .then(({ row }) => {
                  this.$nextTick(() => {
                      this.$refs[tableName].setCurrentRow(row);
                  });
              });
          this.hasChange();
      },
      //删除明细通用方法
      tableRowRemove(tableName) {
          var delrow = this.$refs[tableName].getCurrentRow();
          var havedata = this.$refs[tableName].getTableData().fullData;
          if (delrow && havedata.length > 0) {
              var rowindex = havedata.indexOf(delrow);
              if (havedata.length > 0) {
                  this.$refs[tableName].remove(delrow);
                  if (rowindex == havedata.length - 1) rowindex--;
                  let selectrow = this.$refs[tableName].getTableData().fullData[rowindex];
                  this.$refs[tableName].setCurrentRow(selectrow);
              }
              this.hasChange();
          } else {
              this.$message.warning("请先选中要删除的明细！");
          }
      },
      //清空右侧全部数据，用于【新增按钮】
      clearAllRightData() {
          this.addParam = {};
          this.xxList = [];
          this.gzList = [];
          this.pxList = [];
          this.jcList = [];
          this.zjyList = [];
          this.lwList = [];
          this.zzList = [];
          this.cgList = [];
          this.ktList = [];
          this.zylzList = [];
          this.sgzgzList = [];
          this.xjjlList = [];
          this.khjlList = [];
          this.pxjlList = [];
          this.njjlList = [];
          this.jsList = [];
          this.pgjlList = [];
          this.pgjlmList = [];
      },
      //tab页点击事件 因在vxe-col内使用template插入日期，高度无法自动获取，更新key换tab页当前编辑数据会丢失，所以用recordset只给未编辑的tab页初始化(第一次进入都为未编辑)
      HandleClick(tab, event) {
          this.tabname = tab.name;
          switch (this.tabname) {
                  case "paper": // 论文
                       if(this.lwList.length >0){
                          this.$nextTick(() => {
                              this.$refs.lwTable.setCurrentRow(this.lwList[0]);
                              this.curselectrow = this.lwList[0];
                              this.QueryImage(1);
                          })
                       }
                      break;
                  case "book": // 著作
                      if(this.zzList.length >0){
                              this.$nextTick(() => {
                                  this.$refs.zzTable.setCurrentRow(this.zzList[0]);
                                  this.curselectrow = this.zzList[0];
                                  this.QueryImage(1);
                              })
                          }
                      break;
                  case "patent": // 专利
                      if(this.zlList.length >0){
                          this.$nextTick(() => {
                              this.$refs.zzTable.setCurrentRow(this.zlList[0]);
                              this.curselectrow = this.zlList[0];
                              this.QueryImage(1);
                          })
                      }
                      break;
                  case "estimate": // 评估记录
                          if(this.pgjlList.length >0){
                              this.$nextTick(() => {
                                  this.$refs.pgjlTable.setCurrentRow(this.pgjlList[0]);
                                  this.curselectrow = this.pgjlList[0];
                                  this.getestimatedetail(this.pgjlList[0].estimateid);
                              })
                          }
                          break;
                  default:
                      break;
              }

          if (tab.label == "角色" ) {
              this.jskey++;
              this.jsexm++;
          }
          if (tab.label == "学习" && !(this.$refs.xxTable.getRecordset().insertRecords.length > 0 || this.$refs.xxTable.getRecordset().removeRecords.length > 0 || this.$refs.xxTable.getRecordset().updateRecords.length > 0)) {
              this.xxkey++;
          }
          if (tab.label == "工作" && !(this.$refs.gzTable.getRecordset().insertRecords.length > 0 || this.$refs.gzTable.getRecordset().removeRecords.length > 0 || this.$refs.gzTable.getRecordset().updateRecords.length > 0)) {
              this.gzkey++;
          }
          if (tab.label == "内外部培训" && !(this.$refs.pxTable.getRecordset().insertRecords.length > 0 || this.$refs.pxTable.getRecordset().removeRecords.length > 0 || this.$refs.pxTable.getRecordset().updateRecords.length > 0)) {
              this.pxkey++;
          }
          if (tab.label == "奖惩" && !(this.$refs.jcTable.getRecordset().insertRecords.length > 0 || this.$refs.jcTable.getRecordset().removeRecords.length > 0 || this.$refs.jcTable.getRecordset().updateRecords.length > 0)) {
              this.jckey++;
          }
          if (tab.label == "继续教育" && !(this.$refs.zjyTable.getRecordset().insertRecords.length > 0 || this.$refs.zjyTable.getRecordset().removeRecords.length > 0 || this.$refs.zjyTable.getRecordset().updateRecords.length > 0)) {
              this.zjykey++;
          }
          if (tab.label == "论文" && !(this.$refs.lwTable.getRecordset().insertRecords.length > 0 || this.$refs.lwTable.getRecordset().removeRecords.length > 0 || this.$refs.lwTable.getRecordset().updateRecords.length > 0)) {
              this.lwkey++;
          }
          if (tab.label == "著作" && !(this.$refs.zzTable.getRecordset().insertRecords.length > 0 || this.$refs.zzTable.getRecordset().removeRecords.length > 0 || this.$refs.zzTable.getRecordset().updateRecords.length > 0)) {
              this.zzkey++;
          }
          if (tab.label == "专利" && !(this.$refs.zlTable.getRecordset().insertRecords.length > 0 || this.$refs.zlTable.getRecordset().removeRecords.length > 0 || this.$refs.zlTable.getRecordset().updateRecords.length > 0)) {
              this.zlkey++;
          }
          if (tab.label == "成果" && !(this.$refs.cgTable.getRecordset().insertRecords.length > 0 || this.$refs.cgTable.getRecordset().removeRecords.length > 0 || this.$refs.cgTable.getRecordset().updateRecords.length > 0)) {
              this.cgkey++;
          }
          if (tab.label == "课题" && !(this.$refs.ktTable.getRecordset().insertRecords.length > 0 || this.$refs.ktTable.getRecordset().removeRecords.length > 0 || this.$refs.ktTable.getRecordset().updateRecords.length > 0)) {
              this.ktkey++;
          }
          if (tab.label == "专业轮转" && !(this.$refs.zylzTable.getRecordset().insertRecords.length > 0 || this.$refs.zylzTable.getRecordset().removeRecords.length > 0 || this.$refs.zylzTable.getRecordset().updateRecords.length > 0)) {
              this.zylzkey++;
          }
          if (tab.label == "上岗资格证" && !(this.$refs.sgzgzTable.getRecordset().insertRecords.length > 0 || this.$refs.sgzgzTable.getRecordset().removeRecords.length > 0 || this.$refs.sgzgzTable.getRecordset().updateRecords.length > 0)) {
              this.sgzgzkey++;
          }
          if (tab.label == "年假安排" && !(this.$refs.njjlTable.getRecordset().insertRecords.length > 0 || this.$refs.njjlTable.getRecordset().removeRecords.length > 0 || this.$refs.njjlTable.getRecordset().updateRecords.length > 0)) {
              this.njjlkey++;
          }
          if (tab.label == "休假记录" && !(this.$refs.xjjlTable.getRecordset().insertRecords.length > 0 || this.$refs.xjjlTable.getRecordset().removeRecords.length > 0 || this.$refs.xjjlTable.getRecordset().updateRecords.length > 0)) {
              this.xjjlkey++;
          }
          if (tab.label == "考核记录" && !(this.$refs.khjlTable.getRecordset().insertRecords.length > 0 || this.$refs.khjlTable.getRecordset().removeRecords.length > 0 || this.$refs.khjlTable.getRecordset().updateRecords.length > 0)) {
              this.khjlkey++;
          }
          if (tab.label == "培训记录" ) {
              this.pxjlkey++;
          }
          if (tab.label == "评估记录" ) {
              this.pgjlkey++;
              this.pgjlmkey++;
          }
      },
      //校验整数
      ruleValstr(e, val) {
          let row = e.row;
          if (row.numflag == "1") {
              if (isNaN(row.valstr)) {
                  this.$message.error("字符取值必须为整数！");
                  row.valstr = "";
                  row.valnum = "";
              } else {
                  this.$refs.libruleTable.getTableData().fullData[e.rowIndex].valnum = val.target.value;
              }
          }
      },
      //整数字段变化事件
      numflagChange(row) {
          if (row.numflag == "1") {
              this.ruleValstr(row);
          }
          this.hasChange();
      },

       // 角色 行选中行事件
       jsCurrentChange({ row }) {
          this.getjsexminfo(this.loginuserno,row.roleno);
          //this.detailQuery(row.employeeno);
      },

      // 评估记录 行选中事件
      pgjlCurrentChange({ row }) {
              this.getestimatedetail(this.selrow.estimateid);
          },

      // 评估明细查询
      async  getestimatedetail(estimateid){
          try {
              const res = await this.$tool.request({
                  url: "ucent/personalhomepage",
                  method: "post",
                  data: {
                      action: "getestimatedetail",
                      estimateid: estimateid,
                  },
              });
              if (res.Data.length > 0) {
                  this.$nextTick(async () => {
                      this.pgjlmList = res.Data;
                  });
              }
              else{
                  this.pgjlmList = [];
              }
          } catch {}
      },

      // 论文 行选中事件
      lwCurrentChange({row}){
          this.curselectrow = row;
          this.QueryImage(1);
      },

       // 著作 行选中事件
       zzCurrentChange({row}){
          this.curselectrow = row;
          this.QueryImage(1);
      },


       // 专利 行选中事件
       zlCurrentChange({row}){
          this.curselectrow = row;
          this.QueryImage(1);
      },

      // 获取照片信息
      async getimginfo(row){
          let imgsourceid ="";
          let imgsource = "";
          switch (this.tabname) {
              case "paper": // 论文
                  imgsourceid = row.emplypaperid;
                  imgsource = "1";
                  break;
              case "book": // 著作
                  imgsourceid = row.emplybookid;
                  imgsource = "2";
                  break;
              case "patent": // 专利
                  imgsourceid = row.emplypatentid;
                  imgsource = "3";
                  break;
              default:
                  break;
          }
          if(imgsourceid==""){
              this.paperImageList = [];
              this.bookImageList = [];
              this.patentImageList = [];
              return false;
          }
          try {
              const res = await this.$tool.request({
                  url: "ucent/personalhomepage",
                  method: "post",
                  data: {
                      action: "getimginfo",
                      imgsourceid: imgsourceid,
                      imgsource:imgsourceid,
                      tabname:this.tabname,
                  },
              });
              if (res.Data.length > 0) {
                  this.$nextTick(async () => {
                      switch (this.tabname) {
                          case "paper": // 论文
                              this.paperImageList =  res.Data;
                              break;
                          case "book": // 著作
                              this.bookImageList =  res.Data;
                              break;
                          case "patent": // 专利
                              this.patentImageList =  res.Data;
                              break;
                          default:
                              break;
                      }
                  });
              }
              else{
                  this.paperImageList = [];
                  this.bookImageList = [];
                  this.patentImageList = [];
              }
          } catch {}

      },

      // 获取该角色的考试信息及人员成绩
      async  getjsexminfo(userno,roleno){
          try {
              const res = await this.$tool.request({
                  url: "ucent/personalhomepage",
                  method: "post",
                  data: {
                      action: "getjsexminfo",
                      userno: userno,
                      roleno: roleno,
                  },
              });
              if (res.Data.length > 0) {
                  this.$nextTick(async () => {
                      this.jsexmList = res.Data;
                  });
              }
              else{
                  this.jsexmList = [];
              }
          } catch {}
      },

      offCurrentChange({ row }) {
          this.offcurrow = row;
      },
      //行class，用于新增和编辑行
      rowClassName({ row, rowIndex }) {
          // if (this.AddData.indexOf(row.employeeno) > -1) {
          //     return "rm-new";
          // }
          //     return "rm-modify";
      },
      //vxe cell 编辑事件
      checkMethod({ row }) {
          return false;
      },

      footerMethod({ columns, data }) {
          return [
              columns.map((column, columnIndex) => {
                  if (columnIndex === 0) {
                      return "总计";
                  }
                  if (columnIndex === 4) {
                      return this.totalcount;
                  }
                  return null;
              }),
          ];
      },

      //全选数据
      Focus(event) {
          event.currentTarget.select();
      },
      // 回车切换输入框
      nextFocus(index) {
          if (index <= 41) {
              var that = this;
              var focusIndex = index + 1;
              setTimeout(function () {
                  if ([9, 10, 14, 37].includes(index)) {
                      //select
                      that.$refs["input" + index].blur();
                  }
                  if ([5, 6, 15, 18, 26, 35, 36, 37].includes(index)) {
                      //组件select+dialog
                      that.$refs["input" + index].$refs.ddlmainSelect.blur();
                  }
                  if ([7, 19].includes(index)) {
                      //radio
                      that.$refs["input" + focusIndex].$el.focus();
                  } else {

                      that.$refs["input" + focusIndex].focus();
                  }
              }, 1);
          }
      },

      //编辑改变事件，type1获取拼音码
      hasChange(type) {
          this.changeflag = true;
          if (type == 1) {
              this.addParam.inputcode = this.$pub.CreateInputcode(this.addParam.employeename, this).substring(0, 20);
          }
      },
      //初始化 获取Options 用于格式化表格
      async initOption() {
          try {
              const res = await this.$tool.request({
                  url: "ucent/personalhomepage",
                  method: "post",
                  data: {
                      action: "initOption",
                  },
              });
              this.labdeptOption = res.labdeptOption;
              this.hospOption = res.hospOption;
              this.jobTitle = res.jobTitleOption;
              this.labgroupOption = res.labgroupOption;

          } catch (e) {
              this.$message.warning(e);
          }
      },
      //格式化
      formatFun({ cellValue, column }) {
          return this.commFormatFun(cellValue, column.property);
      },
      //格式化数据
      commFormatFun(cellValue, column) {
          if (column == "hospcode") {
              try {
                  if (cellValue.toLowerCase() == "all" || cellValue == "") {
                      return "全部医院";
                  } else {
                      let hospname = this.hospOption.find((m) => m.data == cellValue);
                      if (hospname != undefined && hospname != null) {
                          return hospname.display;
                      } else {
                          return cellValue;
                      }
                  }
              } catch {}
          } else if (column == "labdeptcode") {
              try {
                  let deptname = this.labdeptOption.find((m) => m.data == cellValue);
                  if (deptname != undefined && deptname != null) {
                      return deptname.display;
                  } else {
                      return cellValue;
                  }
              } catch {}
          } else if (column == "labgroupid") {
              try {
                  let pattypename = this.labgroupOption.find((m) => m.data == cellValue);
                  if (pattypename != undefined && pattypename != null) {
                      return pattypename.display;
                  } else {
                      return cellValue;
                  }
              } catch {}
          } else if (column == "abo_bldtype") {
              try {
                  let aboname = this.aboOption.find((m) => m.value == cellValue);
                  if (aboname != undefined && aboname != null) {
                      return aboname.label;
                  } else {
                      return cellValue;
                  }
              } catch {}
          } else if (column == "rh_bldtype") {
              try {
                  let rhname = this.rhOption.find((m) => m.value == cellValue);
                  if (rhname != undefined && rhname != null) {
                      return rhname.label;
                  } else {
                      return cellValue;
                  }
              } catch {}
          } else if (column == "marriage") {
              try {
                  let marriagename = this.marriageOption.find((m) => m.value == cellValue);
                  if (marriagename != undefined && marriagename != null) {
                      return marriagename.label;
                  } else {
                      return cellValue;
                  }
              } catch {}
          } else if (column == "employtype") {
              try {
                  let employname = this.employTypeOption.find((m) => m.data == cellValue);
                  if (employname != undefined && employname != null) {
                      return employname.display;
                  } else {
                      return cellValue;
                  }
              } catch {}
          } else if (column == "reward") {
              try {
                  let employname = this.employTypeOption.find((m) => m.value == cellValue);
                  if (employname != undefined && employname != null) {
                      return employname.label;
                  } else {
                      return cellValue;
                  }
              } catch {}
          } else if (column == "sex") {
              if (cellValue == "1") {
                  return "男";
              } else if (cellValue == "2") {
                  return "女";
              } else {
                  return "";
              }
          } else if (column == "jobtitle") {
              try {
                  let jobtitlename = this.jobTitle.find((m) => m.data == cellValue);
                  if (jobtitlename != undefined && jobtitlename != null) {
                      return jobtitlename.display;
                  } else {
                      return cellValue;
                  }
              } catch {}
          } else {
              return cellValue;
          }
      },
      /****************************************/
      OpenFileList(flag) {
          this.offcode = flag;
          if (flag == "off_education") {
              this.offname = "最高学历附件";
          } else if (flag == "off_degree") {
              this.offname = "最高学位附件";
          } else if (flag == "off_title") {
              this.offname = "最高职称附件";
          } else if (flag == "off_certif") {
              this.offname = "上岗资格附件";
          }
          this.btnimgQuery(flag);
          this.dialogfilelist = true;
      },
      //附件图片查看
      btnimgQuery(flag) {
          this.imgloading = true;
          this.$tool
              .request({
                  url: "ucent/personalhomepage",
                  method: "post",
                  data: {
                      action: "imgQuery",
                      offcode: this.offcode,
                      recordid: this.selrow.employeeno,
                  },
              })
              .then((res) => {
                  this.secimageData = res.data;
                  this.imgloading = false;
              })
              .catch((e) => {
                  this.imgloading = false;
                  this.$alert(e, "出错");
              });
      },
      btnimgAdd() {
          this.$refs["upload"].$refs["upload-inner"].handleClick();
      },
      btnimgDelete() {
          if (this.loginuserno != "") {
              let row = this.$refs.popxTable.getCurrentRow();
              if (!!row.fileid) {
                  this.imgSave("D", row.fileid)
                      .then((res) => {
                          if (res.errcode == "1") {
                              this.$pub.message(this, "删除成功！", "success");
                              this.btnimgQuery();
                          } else {
                              this.$alert(res.errmsg, "提示");
                          }
                      })
                      .catch((e) => {
                          this.$alert(e, "出错");
                      });
              } else {
                  this.$alert("请选中需要删除的数据！", "提示");
              }
          } else {
              this.$alert("证书ID不存在！", "提示");
          }
      },
      btnimgSave() {
          this.imgSave("M", "")
              .then((res) => {
                  if (res.errcode == "1") {
                      this.$pub.message(this, "保存成功！", "success");
                      this.btnimgQuery();
                  } else {
                      this.$alert(res.errmsg, "提示");
                  }
              })
              .catch((e) => {
                  this.$alert(e, "出错");
              });
      },
      imgSave(utype, fileid) {
          return this.$tool.request({
              url: "ucent/personalhomepage",
              method: "post",
              data: {
                  action: "imgSave",
                  utype: utype,
                  fileid: fileid,
                  saveinfo: this.$refs.popxTable.getRecordset(),
              },
          });
      },
      btnimgCancel() {
          this.dialogfilelist = false;
      },
      fileChange(file, fileList) {
          this.form.file = file.raw;
      },
      // 上传文件之前的钩子, 参数为上传的文件,若返回 false 或者返回 Promise 且被 reject，则停止上传
      beforeUploadFile(file) {},
      uploadOpt(content) {
          let formData = new FormData();
          //统一传到文档管理下面
          formData.append("action", "FileUploadComm");
          //formData.append("fileclassid", "-2");
          formData.append("sysno", "OFF");
          formData.append("pfileclassname", "主任办公文档");
          formData.append("fileclasscode", this.offcode);
          formData.append("fileclassname", this.offname);
          formData.append("recordid", this.selrow.employeeno);
          formData.append("file", content.file);
          formData.append("currentuser", this.$tool.getSession(this.$tool.loginuserno));
          formData.append("hospcode", this.$tool.getSession(this.$tool.selectedhis));
          this.$pub.uploadFileOpt(this, formData, "btnimgQuery");
      },
      //预览图片
      getpic() {
          var field = this.offcurrow.fileid;
          this.PhotoImageUrl = "";
          this.PhotoImageUrlList = [];
          this.$tool
              .request({
                  url: "ucent/personalhomepage",
                  method: "post",
                  data: {
                      action: "getpic",
                      fileid: field,
                  },
              })
              .then((res) => {
                  this.PhotoImageUrl = res.picstr;
                  this.PhotoImageUrlList.push(this.PhotoImageUrl);
                  this.bShowPic = true;
              });
      },

      checkdata(){
          return false;
      },
        // 上传图片
        uploadimage(simg) {
          var file = simg.file;
          var name = file.name; //选中文件的文件名
          var size = file.size; //选中文件的大小
          this.imagename = file.name; //选中文件的文件名
          //this.$alert(file.name);

          var reader = new FileReader();
          var AllowImgFileSize = 10485760; //上传图片最大值(单位字节)（ 10 M = 10485760 B ）超过2M上传失败
          var imgUrlBase64;
          var _this = this;
          if (file) {
              //将文件以Data URL形式读入页面
              imgUrlBase64 = reader.readAsDataURL(file);

              reader.onload = function (e) {
                  //var ImgFileSize = reader.result.substring(reader.result.indexOf(",") + 1).length;//截取base64码部分（可选可不选，需要与后台沟通）
                  if (AllowImgFileSize != 0 && AllowImgFileSize < reader.result.length) {
                      _this.$alert("只能上传不超过10M的图片", "错误", {
                          confirmButtonText: "确定",
                      });
                      return;
                  } else {
                      //执行上传操作
                      _this.ImageUpload(reader.result);
                  }
              };
          }
      },
      // 执行上传
      ImageUpload(imagedata) {
          var imgsourceid = "";
          var imgsource = "";
          if(this.curselectrow == "" || this.curselectrow == null){
              if(this.tabname == "paper"){
                  this.$message.error("请先选择论文记录！");
              }
              else if(this.tabname =="book"){
                  this.$message.error("请先选择著作记录！");
              }
              else if(this.tabname =="patent"){
                  this.$message.error("请先选择专利记录！");
              }
              return false;
          }
          else{
              switch (this.tabname) {
                  case "paper": // 论文
                      imgsourceid = this.curselectrow.emplypaperid;
                      imgsource="1";
                      break;
                  case "book": // 著作
                      imgsourceid = this.curselectrow.emplybookid;
                      imgsource="2";
                      break;
                  case "patent": // 专利
                      imgsourceid = this.curselectrow.emplypatentid;
                      imgsource="3";
                      break;
                  default:
                      break;
              }
          }

          this.$tool
              .request({
                  url: "ucent/personalhomepage",
                  method: "post",
                  data: {
                      action: "saveimage",
                      imagedata: imagedata,
                      imgsourceid:imgsourceid,
                      imgsource:imgsource,
                      imagename : this.imagename,
                  },
              })
              .then((res) => {
                  if (res != "") {
                      this.$alert(res);
                  } else {
                      this.QueryImage(1);
                  }
              });
      },

       // 检索图像
       QueryImage(index) {
          let imgsourceid ="";
          let imgsource = "";
          switch (this.tabname) {
              case "paper": // 论文
                  imgsourceid = this.curselectrow.emplypaperid;
                  imgsource = "1";
                  break;
              case "book": // 著作
                  imgsourceid = this.curselectrow.emplybookid;
                  imgsource = "2";
                  break;
              case "patent": // 专利
                  imgsourceid = this.curselectrow.emplypatentid;
                  imgsource = "3";
                  break;
              default:
                  break;
          }

          this.$tool
              .request({
                  url: "ucent/personalhomepage",
                  method: "post",
                  data: {
                      action: "getimginfo",
                      imgsourceid: imgsourceid,
                      imgsource:imgsource,
                  },
              })
              .then((res) => {
                  if (!res.hasOwnProperty("errcode")) {
                      this.DealImageData(res, index);
                  }
              })
              .catch((error) => {
                  this.$message.error("错误:" + error);
              });
      },

      DealImageData(res, index) {
          this.paperImageList = [];
          this.bookImageList = [];
          this.patentImageList = [];
          var ImageList = res.Data;
          if(ImageList.length >0){
              switch (this.tabname) {
                  case "paper": // 论文
                      for(let i = 0; i < ImageList.length; i++){
                          this.paperImageList.push({
                              url: ImageList[i].Item1,
                              name: ImageList[i].Item2,
                              imgid:ImageList[i].Item3,
                              comm: ImageList[i].Item4,
                              seq: ImageList[i].Item5 });
                          this.paperImageIndex.push(false);
                      }
                      if (index) {
                          this.selectimage = XE.clone(this.paperImageList[index - 1].url, true);
                          this.selectseq = XE.clone(this.paperImageList[index - 1].seq, true);
                          this.selectname = XE.clone(this.paperImageList[index - 1].name, true);
                          this.selectimgid = XE.clone(this.paperImageList[index - 1].imgid, true);
                          this.imagecomm = this.paperImageList[index - 1].comm;
                          this.paperImageIndex[index - 1] = true;
                      } else {
                          this.selectimage = XE.clone(this.paperImageList[0].url, true);
                          this.selectseq = XE.clone(this.paperImageList[0].seq, true);
                          this.selectname = XE.clone(this.paperImageList[0].name, true);
                          this.selectimgid = XE.clone(this.paperImageList[0].imgid, true);
                          this.imagecomm = this.paperImageList[0].comm;
                          this.paperImageIndex[0] = true;
                      }
                      break;
                  case "book": // 著作
                      for(let i = 0; i < ImageList.length; i++){
                              this.bookImageList.push({
                                  url: ImageList[i].Item1,
                                  name: ImageList[i].Item2,
                                  imgid:ImageList[i].Item3,
                                  comm: ImageList[i].Item4,
                                  seq: ImageList[i].Item5 });
                              this.bookImageIndex.push(false);
                      }
                      if (index) {
                          this.selectimage = XE.clone(this.bookImageList[index - 1].url, true);
                          this.selectseq = XE.clone(this.bookImageList[index - 1].seq, true);
                          this.selectname = XE.clone(this.bookImageList[index - 1].name, true);
                          this.selectimgid = XE.clone(this.bookImageList[index - 1].imgid, true);
                          this.imagecomm = this.bookImageList[index - 1].comm;
                          this.bookImageIndex[index - 1] = true;
                      } else {
                          this.selectimage = XE.clone(this.bookImageList[0].url, true);
                          this.selectseq = XE.clone(this.bookImageList[0].seq, true);
                          this.selectname = XE.clone(this.bookImageList[0].name, true);
                          this.selectimgid = XE.clone(this.bookImageList[0].imgid, true);
                          this.imagecomm = this.bookImageList[0].comm;
                          this.bookImageIndex[0] = true;
                      }
                      break;
                  case "patent": // 专利
                      for(let i = 0; i < ImageList.length; i++){
                              this.patentImageList.push({
                                  url: ImageList[i].Item1,
                                  name: ImageList[i].Item2,
                                  imgid:ImageList[i].Item3,
                                  comm: ImageList[i].Item4,
                                  seq: ImageList[i].Item5 });
                              this.patentImageIndex.push(false);
                      }
                      if (index) {
                          this.selectimage = XE.clone(this.patentImageList[index - 1].url, true);
                          this.selectseq = XE.clone(this.patentImageList[index - 1].seq, true);
                          this.selectname = XE.clone(this.patentImageList[index - 1].name, true);
                          this.selectimgid = XE.clone(this.patentImageList[index - 1].imgid, true);
                          this.imagecomm = this.patentImageList[index - 1].comm;
                          this.patentImageIndex[index - 1] = true;
                          } else {
                          this.selectimage = XE.clone(this.patentImageList[0].url, true);
                          this.selectseq = XE.clone(this.patentImageList[0].seq, true);
                          this.selectname = XE.clone(this.patentImageList[0].name, true);
                          this.selectimgid = XE.clone(this.patentImageList[0].imgid, true);
                          this.imagecomm = this.patentImageList[0].comm;
                          this.patentImageIndex[0] = true;
                      }
                      break;
                  default:
                      break;
              }
          }
          else{
              this.ImageList = [];
              this.paperImageIndex = [];
              this.bookImageIndex = [];
              this.selectimage = "";
              this.selectname = "";
               this.selectimgid = "";
              this.selectseq = "";
          }
      },

      // 点击获取清晰度更高的图片
      ShowClearImage(img, seq){
          this.$tool
              .request({
                  url: "ucent/personalhomepage",
                  method: "post",
                  data: {
                      action: "queryclearimage",
                      imgid: img.imgid,
                  },
              })
              .then((res) => {
                  if (!res.hasOwnProperty("errcode")) {
                      this.f = res;
                      this.dialogimgVisible = true;
                  }
              })
              .catch((error) => {
                  this.$message.error("错误:" + error);
              });
      },

       // 图片更换
       imagechange(img, index) {
          this.selectimage = "";
          this.selectimage = img.url;
          this.imagecomm = img.comm;
          this.selectname = img.name;
          this.selectimgid = img.imgid;
          this.selectseq = img.seq;
          switch (this.tabname) {
              case "paper": // 论文
                  for (let i = 0; i < this.paperImageIndex.length; i++) {
                      this.paperImageIndex[i] = false;
                  }
                  this.paperImageIndex[index] = true;
                  break;
              case "book": // 著作
                  for (let i = 0; i < this.bookImageIndex.length; i++) {
                      this.bookImageIndex[i] = false;
                  }
                  this.bookImageIndex[index] = true;
                  break;
              case "patent": // 专利
                  for (let i = 0; i < this.patentImageIndex.length; i++) {
                      this.patentImageIndex[i] = false;
                  }
                  this.patentImageIndex[index] = true;
                  break;
              default:
                  break;
          }
      },
      DelImage() {
          this.$tool
              .request({
                  url: "ucent/personalhomepage",
                  method: "post",
                  data: {
                      action: "delimage",
                      imgid: this.selectimgid,
                  },
              })
              .then((res) => {
                  if (res != "") {
                      this.$alert(res);
                  } else {
                      this.QueryImage(1);
                  }
              });
      },
       // 考核记录 行选中事件
       khjlcurrentChangeEvent({row}){

          if(row.testid){
              this.isallowdel = false;
          }
          else{
              this.isallowdel = true;
          }
      },
  },
};
</script>

<style scoped>
table {
  font-size: 12px;
  border-collapse: separate;
  border-spacing: 5px;
}

.middle-left {
  border: #e4e4e7;
  border-style: solid;
  border-width: 2px;
}
.page-container {
  position: absolute;
  top: 0px;
  width: 100%;
  left: 0;
  bottom: 0;
  padding: 0;
  display: flex;
}
.page-top {
  width: 100%;
  height: 99px;
  border: 1px solid #ccc;
  position: absolute;
  font-size: 12px;
}
.page-top .top-table {
  padding-bottom: 5px;
  right: 5px;
  position: absolute;
}
.upload-button {
  height: 24px;
  margin: 0 10px;
  display: none;
}
.upload-button div {
  height: 24px;
}
.page-bottom {
  margin-top: 5px;
  position: absolute;
  font-size: 12px;
  width: 100%;
  height: 100%;
}
.base-detail {
  width: 60%;
}
::v-deep  .base-detail .el-form-item--small.el-form-item {
  margin-bottom: 0 !important;
}
::v-deep  .base-detail .el-select {
  width: 100%;
}
::v-deep  .middle-right .el-tabs--border-card > .el-tabs__content {
  overflow-y: auto;
}
/* ::v-deep .el-textarea__inner {
  padding: 5px 5px;
} */
::v-deep .el-textarea__inner {
  display: block;
  resize: vertical;
  padding: 2px 4px;
}
.pane-table {
  height: 100%;
}
.pane-table .vxe-table {
  height: 100%;
  width: 100%;
}
.pane-edit-table .vxe-table {
  /* height: calc(100% -30px); */
}
/* .pane-search-table .vxe-table {
  height: calc(100% - 30px);
} */
.pane-search-table .el-input {
  margin-bottom: 5px;
  width: 100%;
}
.pane-flex {
  height: 100%;
  width: 100%;
  display: flex;
}
.pane-flex div {
  width: calc(50% - 2px);
  display: inline-block;
}
.detail-operation {
  display: flex;
  padding: 0px 2px 0px 2px;
  margin: 5px 0 0 0;
}
::v-deep  .el-checkbox__input.is-disabled.is-checked .el-checkbox__inner::after {
  border-color: #000000;
}
::v-deep  .el-button.is-disabled {
  border: 0px;
  color: grey;
  background-color: #e6e6e6;
  font-weight: normal;
}
::v-deep .el-input.is-disabled .el-input__inner {
  color: black;
}
::v-deep  tr.vxe-body--row.row--current {
  color: #000000;
  font-weight: bold;
}
</style>
